(ns template
 (:import (org.antlr.stringtemplate StringTemplate))
 )

(def path ()

(defn do-sm
	[s & args ]
	(let [ st (org.antlr.stringtemplate.StringTemplate. s)
       args (partition 2 args)]
	    (do (doseq [ a args]
           (.setAttribute st (first a) (second a))
		     )
	    (str   st))))

(defmacro do-t
     [ f t & args]
    `(let [ r# (slurp ~f)
            w# (java.io.FileWriter. ~t )]
        (do (.append  w# ( do-sm r# ~@args))
          (.close w#)
          )))






